package com.molichuxing.services.util;

import com.baidu.aip.ocr.AipOcr;

public class BaiduOCRClient {
    //设置APPID/AK/SK
    public static final String APP_ID = "11636872";
    public static final String API_KEY = "sb4SHefjbrKFnR8Vuej2lz1N";
    public static final String SECRET_KEY = "1yL6Mbvwv6fkwtiSXWk6eXVIkILHitkv";

    private final static AipOcr ocrClient = new AipOcr(APP_ID, API_KEY, SECRET_KEY);

    private BaiduOCRClient(){}

    public static AipOcr getInstance(){
        // 可选：设置网络连接参数
        ocrClient.setConnectionTimeoutInMillis(2000);
        ocrClient.setSocketTimeoutInMillis(60000);
        return ocrClient;
    }

}
